<?php
/*
 * @Date: 2020-05-03 22:03:52
 * @名称: 
 * @版本: 0.01
 * @作者: 初雪桜
 * @邮箱: 202184199@qq.com
 * @最后编辑人: 初雪桜
 * @LastEditTime: 2020-06-09 11:17:38
 * @FilePath: /Pica_acg服务器/app/serverLocalhost/controller/Images.php
 */

namespace app\serverLocalhost\controller;

use app\BaseController;
use think\facade\Db;
use think\facade\View;

class Images extends BaseController
{
    public function getImages()
    {


dump(input());
        return;
        $images_id = input('id');
        $info = Db::table('book_info_images_list')
            ->where([
                "_id" =>  $images_id,
            ])
            ->find();
        if (!$info) {
            $info['images_src'] = "https://i0.hdslb.com/bfs/album/1966de8a250dbcdd2fdef5062628dae51419a78c.jpg";
        }
        // $url = 'public/update/imagesupdate/5af393a7db91d02c83d987b4/582186a35f6b9a4f93dcb549/582186a35f6b9a4f93dcb54b/81832154_p0.jpg';
        //file_get_contents($url,true); 可以读取远程图片，也可以读取本地图片
        $img = file_get_contents($info['images_src'], true);
        header('Content-type:image/gif,image/png,image/jpg,image/jpeg');
        echo $img;
        exit;
        // return response($img, 200)->contentType('image/gif,image/png,image/jpg,image/jpeg');
    }
}
